package verify

import (
	"awesomeProject/app/request"
	"errors"
)

func RefundPagination(r *request.RefundPagination) error {
	if r.PageIndex == 0 {
		r.PageIndex = 1
	}
	if r.PageSize == 0 {
		r.PageSize = 20
	}
	return nil
}

func Detail(r *request.RefundDetail) error {
	if r.ShopId == 0 {
		return errors.New("店铺ID错误！")
	}
	if r.RefundOrderNumber == "" {
		return errors.New("退供单号错误！")
	}
	return nil
}
